# -*- coding: utf-8 -*-
"""
Created on Wed Dec 19 17:15:52 2018

@author: 刘丹
"""
import datetime
import pickle
import pandas as pd
import os
from gov.gov_app import GovDataSimulateApp


# 获取计算所需的数据
path1 = os.path.join(os.getcwd(), 'data\\dlh_equip_num_addequipdata.txt')
f = open(path1, 'rb')
dlh_equip_num = pickle.load(f)
f.close()
path2 = os.path.join(os.getcwd(), 'data\\cal_A.csv')
cal_A = pd.read_csv(path2, engine='python')

# 设置数据库的地址和端口
db_addr = 'localhost'
db_port = 27017

app = GovDataSimulateApp(
    __name__,
    db_addr=db_addr,
    db_port=db_port,
    dlh_equip_num=dlh_equip_num,
    cal_A=cal_A
)

app.run()
